﻿
using Db7;
using Db7_ut.DomainObjects;
namespace Db7_ut.Views.Scrolling
{
    public class VScrollbarTest
    {
        Employee _emp;
        public VScrollbarTest(string ContainerID)
        {

            _emp = new Employee();
            _emp.AgeDB = new IntBinder(20);

            VirtualElement parent = new VirtualElement(); parent.Tag = "span";

            VInput textBox = new VInput(); parent.ChildrenNN.Add(textBox);
            textBox.Value_DB = new StringBinder(null);
            textBox.Value_DB.SetIntInnerBinder(_emp.AgeDB);

            VScrollbar vbarV = new VScrollbar(); parent.Children.Add(vbarV);
            vbarV.MaxValue = 20000;
            vbarV.DimensionsNN.Height = 200;
            vbarV.ScrollValue_DB = _emp.AgeDB;

            VScrollbar vbarH = new VScrollbar(); parent.Children.Add(vbarH);
            vbarH.HorizontalOrientation = true;
            vbarH.MaxValue = 20000;
            vbarH.DimensionsNN.Width = 200;
            vbarH.ScrollValue_DB = _emp.AgeDB;


            parent.RenderInside(ContainerID);
        }
    }
}
